package test1;

import java.io.DataOutputStream;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class client {
    public static void main(String[] args) throws IOException {
        InetAddress localHost = InetAddress.getLocalHost();
        System.out.println(localHost);
        Socket socket = new Socket("zjc的电脑",5677);

        DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
        dos.writeUTF("你好，我是客户端小白");
        dos.close();
        socket.close();

    }
}
